package cn.shop.gateway.model;

import java.util.StringJoiner;

/**
 * @author : 李一涵
 * @date : Created in 2021-12-7 16:34
 * @description :
 */
public class MerchantUser {

    private Long id;
    private String account;
    private String password;
    private String secret;

    public void setId(Long id) {
        this.id = id;
    }

    public String getAccount() {
        return account;
    }

    public void setAccount(String account) {
        this.account = account;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public Long getId() {
        return id;
    }

    public String getSecret() {
        return secret;
    }

    public void setSecret(String secret) {
        this.secret = secret;
    }

    @Override
    public String toString() {
        return new StringJoiner(", ", MerchantUser.class.getSimpleName() + "[", "]")
                .add("id=" + id)
                .add("account='" + account + "'")
                .add("password='" + password + "'")
                .add("secret='" + secret + "'")
                .toString();
    }

    public static class Table {
        public final static String NAME = "merchant_info";
        public final static String CREATE_SQL = "CREATE TABLE " + NAME + "(" +
                Field.ID + " bigint key NOT NULL," +
                Field.ACCOUNT + " TEXT," +
                Field.PASSWORD + " TEXT" +
                ")";
    }

    public static class Field {
        public final static String ID = "id";
        public final static String ACCOUNT = "account";
        public final static String PASSWORD = "password";
    }
}
